package intf;


/**
 * Created by IntelliJ IDEA.
 * User: sigolaev_va
 * Date: 25.01.2013
 * Time: 12:15:38
 * Interface to point object
 */
public interface IPoint extends ICommonItem
{
  /**
   * X coordinate
   * @return double with X
   */
  double X();

  /**
   * Y coordinate
   * @return double with Y
   */
  double Y();

  /**
   * Sets the point to new values
   * @param x X value to set
   * @param y Y value to set
   */
  void setXY(double x, double y);

  double distanceTo( ICommonItem item );

  /**
   * Sets delivery cost
   * @param val double value to set for delivery cost of this point
   */
  double setDCost( double val );

  /**
   * Hosting line if exists, {@code null} if this is single point
   * @return {@link ILine} instance containing this point or {@code null} if point is single one
   */
  ILine host();

  IPoint copy();
}
